const mongoose = require('../db');

const Shop = mongoose.Schema({
    title: String,
    price: Number,
    img: String,
    classify: String
})

// 封装一个表
var shop = mongoose.model('shop', Shop);

// var s = new shop({
//     title : "【冰淇淋】梦龙松露巧克力口味冰淇淋65克",
//     price : 9.59,
//     img : "https://img30.360buyimg.com/n6/s240x240_jfs/t1/211112/38/23700/35916/62b17690E8663e4f3/a9b9e4216bb73b53.jpg",
//     classify : "京东到家"
// })
// s.save().then((result) => {
//     console.log(result);
//     mongoose.disconnect();
// }).catch((err) => {
//     console.log(err);
//     mongoose.disconnect();
// })

module.exports = shop;
